package com.locust.junit.dubbo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/**
 * 启动Dubbo服务用的MainClass.
 */
public class UpmsDubboProvider {
	
	private static Logger logger = LoggerFactory.getLogger(UpmsDubboProvider.class);

	public static void main(String[] args) {
		try {
			new ClassPathXmlApplicationContext("classpath:spring-context.xml").start();
		} catch (Exception e) {
			logger.error("== DubboProvider context start error:",e);
		}
		synchronized (UpmsDubboProvider.class) {
			while (true) {
				try {
					UpmsDubboProvider.class.wait();
				} catch (InterruptedException e) {
					logger.error("== synchronized error:",e);
				}
			}
		}
	}
    
}